package com.hcc.export.helper.test.controller;

import com.hcc.export.helper.core.domain.po.ExportTaskRecord;
import com.hcc.export.helper.core.service.ExportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hushengjun
 * @since 2024/01/08 15:24:23
 */
@RestController
@RequestMapping("/export-helper")
public class ExportController {

    @Autowired
    private ExportService exportService;

    @GetMapping("/submit-export-task")
    public void submitExportTask() {
        ExportTaskRecord exportTaskRecord = new ExportTaskRecord();
        exportTaskRecord.setExportCode("test");
        exportTaskRecord.setExportParamJson("{\"page\": 1}");
        exportTaskRecord.setFileName("测试导出");
        exportTaskRecord.setExportUserId(1L);
        exportTaskRecord.setExportUserName("hhssjj");

        exportService.submitExportTask(exportTaskRecord);
    }

}
